"""
__author__ = 'XiaoNing Wang'
"""

class Calculator:

    # try:
    #     def add(self, a, b):
    #         return a+b
    #
    #     def divide(self, a, b):
    #         return a/b
    # except ZeroDivisionError:
    #
    #     print('除数不能为0')
    #
    # except TypeError:
    #     print('参与运算的只能是数字类型')

    def add(self, a, b):
        try:
            return a+b
        except:
            return None

    def divide(self, a, b):
        try:
            return a/b
        except:
            return None
